package com.calendar.api.repository;

import com.calendar.api.model.Event;
import com.calendar.api.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.util.List;

@Repository
public interface EventRepository extends JpaRepository<Event, Long> {
    List<Event> findByDateBetweenAndUser(LocalDate startDate, LocalDate endDate, User user);
    List<Event> findByDateAndUser(LocalDate date, User user);
    List<Event> findByUser(User user);
} 